﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ThreeByte.ActiveDeck.Config;
using System.Windows.Forms.Integration;

namespace ThreeByte.ActiveDeck.Controls
{
    public partial class SetupForm : Form
    {
        public SetupForm(CoreConfig config) {
            InitializeComponent();

            SetupControl setupControl = new SetupControl(config);

            setupControl.Close += new EventHandler(setupControl_Close);
            
            //Add Setup Form
            ElementHost elementHost = new ElementHost();
            elementHost.Dock = DockStyle.Fill;
            elementHost.Location = new Point(0, 0);
            elementHost.Name = "elementHost";
            elementHost.Child = setupControl;
            this.Controls.Add(elementHost);

            this.Size = new Size((int)setupControl.MinWidth, (int)setupControl.MinHeight + 46);
        }

        void setupControl_Close(object sender, EventArgs e) {
            Close();
        }
    }
}
